﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IPagedList.cs" company="XamlNinja">
//   2011 Richard Griffin and Ollie Riches
// </copyright>
// <summary>
//   The i paged list.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace WP7Contrib.Collections
{
    using System.Collections.Generic;

    /// <summary>
    /// Marker interface for paged list.
    /// </summary>
    public interface IPagedList
    {
    }

    /// <summary>
    ///  Generic interface for paged list collection, an implmentation of this interface has to support binding via the IEnumerable interface.
    /// </summary>
    /// <typeparam name="T">The type being used for binding.
    /// </typeparam>
    public interface IPagedList<T> : IPagedList, IEnumerable<T> where T : class, new()
    {
        /// <summary>
        /// Gets or sets the total number of items.
        /// </summary>
        int Total { get; set; }

        /// <summary>
        /// Gets or sets page index.
        /// </summary>
        int PageIndex { get; set; }

        /// <summary>
        /// Gets or sets page size.
        /// </summary>
        int PageSize { get; set; }

        /// <summary>
        /// Gets or sets the generic list collection.
        /// </summary>
        List<T> Items { get; set; }
    }
}